<div class="dux-tools">
  <div class="bread-head">第三方代码 <span class="small">如客服代码，统计代码</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__"> 代码管理</a> </div>
    <?php if(model('user_group')->model_power('fragment','add')){ ?>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加代码 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <li><a href="__URL__/add">添加代码</a></li>
      </ul>
    </div>
   <?php } ?>
  </div>
</div>
<div class="admin-main"> 
  <!--管理员列表-->
  <div class="panel dux-box">
    <div class="table-responsive">
      <table id="table" class="table table-hover ">
        <tbody>
          <tr>
            <th width="80">编号</th>
            <th width="*">描述</th>
            <th width="*">标识</th>
            <th width="150">模型操作</th>
          </tr>
          <!--foreach:{$list $vo}-->
          <tr>
            <td>{$vo.id}</td>
            <td>{$vo.title}</td>
            <td>{$vo.sign}</td>
            <td><?php if(model('user_group')->model_power('fragment','edit')){ ?>
                &nbsp;&nbsp;<a href="__URL__/edit/id-{$vo.id}" class="button bg-blue button-small icon-pencil" title="修改"></a>
                <?php } ?>
                <?php if(model('user_group')->model_power('fragment','del')){ ?>
                &nbsp;&nbsp;<a class="button bg-red button-small icon-trash-o js-del" href="javascript:void(0);" onClick="del('{$vo.id}',this)" title="删除"></a>
                <?php } ?></td>
          </tr>
          <!--{/foreach}-->
        </tbody>
      </table>
    </div>
  </div>
</div>
<script>
//自定义变量
function del(id,obj) {
	var obj;
	ajaxpost({
		name:'删除此代码？',
		url:"__URL__/del",
		data:{id: id},
		tip:1,
		success:function(){
			$(obj).parent().parent().remove();
		}
	});
}
</script>